﻿
using System.Windows;
using Messenia.GUI.ServiceResolver;
using Messenia.Data.Interfaces;
using Messenia.Data.Models;


namespace Messenia.GUI {
    /// <summary>
    /// Interaction logic for AddStatus.xaml
    /// </summary>
    public partial class AddStatus :Window {
        public AddStatus () {
            InitializeComponent ();
        }

        private void btnSave_Click (object sender, RoutedEventArgs e) {
            
            if ( txtStatusName.Text.Trim () == "" )
                return;
            if ( txtDescription.Text.Trim () == "" )
                return;
            NHAOPResolver.Resolve<IProject> ().Save (new ProjectStatus (0,txtDescription.Text,txtStatusName.Text));
            Close();
        }

        private void btnCancel_Click (object sender, RoutedEventArgs e) {
            Close();
        }
    }
}
